package com.mune.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mune.common.to.mq.SeckillOrderTo;
import com.mune.common.utils.PageUtils;
import com.mune.gulimall.order.entity.OrderEntity;
import com.mune.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author mune
 * @email 1356008591@qq.com
 * @date 2020-07-29 10:15:19
 */
public interface OrderService extends IService<OrderEntity> {

  PageUtils queryPage(Map<String, Object> params);

  OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

  SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

  OrderEntity getOrderByOrderSn(String orderSn);

  void closeOrder(OrderEntity orderEntity);

  PayVo getPayByOrderSn(String orderSn);

  PageUtils queryPageItem(Map<String, Object> params);

  String handlePayResult(PayAsyncVo payVo);

  void createSeckillOrder(SeckillOrderTo orderTo);
}

